package com.yunfei.bo;


import com.yunfei.api.v2.qiuzhi.result.QiuZhiResult;
import com.yunfei.entity.SkQuesDtlEntity;
import com.yunfei.utils.string.StringUtil;

/**
 *@tablename SK_QUES_DTL
 *@author zhengyunfei
 *@createDate Tue Oct 23 10:23:54 CST 2018
 */


public class SkQuesDtlBo implements java.io.Serializable{
 private String quesId;
 private String quesTit;
 private String userId;
 private String headIcon;
 private String userName;
 private String userType;
 private String createDate;
 private String remdFlg;
 private String hopgFlg;
 private String hopgOrder;
 private String checkFlg;
 private String checkDate;
 private String checkUser;
 private String viewCnt;
 private String answCnt;
 private String hopgDate;
 private String field;
 private String order;

    public String getHeadIcon() {
        return headIcon;
    }

    public void setHeadIcon(String headIcon) {
        this.headIcon = headIcon;
    }

    public String getHopgDate() {
        return hopgDate;
    }

    public void setHopgDate(String hopgDate) {
        this.hopgDate = hopgDate;
    }

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    /**
     * 更改排序字段
     * @return
     */
public String getField() {
        return field;
}
public void setField(String field) {
        this.field = field;
}
public String getOrder() {
        return order;
}
public void setOrder(String order) {
        this.order = order;
}
 private int curNo;
 public int getCurNo() {
     return curNo;
 }
 public void setCurNo(int curNo) {
     this.curNo = curNo;
 }
 private int curSize;
 public int getCurSize() {
     return curSize;
 }
 public void setCurSize(int curSize) {
     this.curSize = curSize;
 }
 public void setQuesId(String quesId){
     this.quesId=quesId;
 }
 public String getQuesId(){
     return quesId;
 }
 public void setQuesTit(String quesTit){
     this.quesTit=quesTit;
 }
 public String getQuesTit(){
     return quesTit;
 }
 public void setUserId(String userId){
     this.userId=userId;
 }
 public String getUserId(){
     return userId;
 }
 public void setCreateDate(String createDate){
     this.createDate=createDate;
 }
 public String getCreateDate(){
     return createDate;
 }
 public void setRemdFlg(String remdFlg){
     this.remdFlg=remdFlg;
 }
 public String getRemdFlg(){
     return remdFlg;
 }
 public void setHopgFlg(String hopgFlg){
     this.hopgFlg=hopgFlg;
 }
 public String getHopgFlg(){
     return hopgFlg;
 }
 public void setHopgOrder(String hopgOrder){
     this.hopgOrder=hopgOrder;
 }
 public String getHopgOrder(){
     return hopgOrder;
 }
 public void setCheckFlg(String checkFlg){
     this.checkFlg=checkFlg;
 }
 public String getCheckFlg(){
     return checkFlg;
 }
 public void setCheckDate(String checkDate){
     this.checkDate=checkDate;
 }
 public String getCheckDate(){
     return checkDate;
 }
 public void setCheckUser(String checkUser){
     this.checkUser=checkUser;
 }
 public String getCheckUser(){
     return checkUser;
 }
 public void setViewCnt(String viewCnt){
     this.viewCnt=viewCnt;
 }
 public String getViewCnt(){
     return viewCnt;
 }
 public void setAnswCnt(String answCnt){
     this.answCnt=answCnt;
 }
 public String getAnswCnt(){
     return answCnt;
 }
 public static SkQuesDtlEntity boToEntity(SkQuesDtlBo bo){
     SkQuesDtlEntity entity=new SkQuesDtlEntity();
     entity.setQuesId(bo.getQuesId());
     entity.setQuesTit(bo.getQuesTit());
     entity.setUserId(bo.getUserId());
     entity.setCreateDate(bo.getCreateDate());
     entity.setRemdFlg(bo.getRemdFlg());
     entity.setHopgFlg(bo.getHopgFlg());
     entity.setHopgOrder(bo.getHopgOrder());
     entity.setCheckFlg(bo.getCheckFlg());
     entity.setCheckDate(bo.getCheckDate());
     entity.setCheckUser(bo.getCheckUser());
     entity.setViewCnt(bo.getViewCnt());
     entity.setAnswCnt(bo.getAnswCnt());
     entity.setQuesTit(bo.getQuesTit());
     return entity;
 }
 public static SkQuesDtlBo entityToBo(SkQuesDtlEntity bo){
     SkQuesDtlBo entity=new SkQuesDtlBo();
     entity.setQuesId(bo.getQuesId());
     entity.setQuesTit(bo.getQuesTit());
     entity.setUserId(bo.getUserId());
     entity.setCreateDate(bo.getCreateDate());
     entity.setRemdFlg(bo.getRemdFlg());
     entity.setHopgFlg(bo.getHopgFlg());
     entity.setHopgOrder(bo.getHopgOrder());
     entity.setCheckFlg(bo.getCheckFlg());
     entity.setCheckDate(bo.getCheckDate());
     entity.setCheckUser(bo.getCheckUser());
     entity.setViewCnt(bo.getViewCnt());
     entity.setAnswCnt(bo.getAnswCnt());
     entity.setQuesTit(bo.getQuesTit());
     return entity;
 }
 public static String changeFieldColumn(String field){
     String result="";
         if(!StringUtil.isNullOrEmpty(field)){
             if(field.equals("quesId")){
                 result="QUES_ID";
             }
             if(field.equals("quesTit")){
                 result="QUES_TIT";
             }
             if(field.equals("userId")){
                 result="USER_ID";
             }
             if(field.equals("createDate")){
                 result="CREATE_DATE";
             }
             if(field.equals("remdFlg")){
                 result="REMD_FLG";
             }
             if(field.equals("hopgFlg")){
                 result="HOPG_FLG";
             }
             if(field.equals("hopgOrder")){
                 result="HOPG_ORDER";
             }
             if(field.equals("checkFlg")){
                 result="CHECK_FLG";
             }
             if(field.equals("checkDate")){
                 result="CHECK_DATE";
             }
             if(field.equals("checkUser")){
                 result="CHECK_USER";
             }
             if(field.equals("viewCnt")){
                 result="VIEW_CNT";
             }
             if(field.equals("answCnt")){
                 result="ANSW_CNT";
             }
     }
     return result;
 }
    public static QiuZhiResult boToApiResult(SkQuesDtlBo bo) {
        String quesId=bo.getQuesId();
        String quesTitle=bo.getQuesTit();
        String createDate=bo.getCreateDate();
        QiuZhiResult qiuZhiResult=new QiuZhiResult();
        qiuZhiResult.setQuesId(quesId);
        qiuZhiResult.setQuesTit(quesTitle);
        qiuZhiResult.setCreateDate(createDate);
        qiuZhiResult.setUserId(bo.getUserId());
        qiuZhiResult.setUserName(bo.getUserName());
        qiuZhiResult.setUserType(bo.getUserType());
        qiuZhiResult.setHeadIcon(bo.getHeadIcon());
        return qiuZhiResult;
    }
}

